//返回指定时间，其后一周的时间数组
export function getWeek(date){

    let today = date||new Date();
    let weekArr = []
    for(let i=0;i<7;i++){
        let newDate = new Date(today.getTime()+i*1000*60*60*24)
        let year = newDate.getFullYear()
        let month = (parseInt(newDate.getMonth())+1)>9?(parseInt(newDate.getMonth())+1):"0"+(parseInt(newDate.getMonth())+1)
        let day = (newDate.getDate())>9?newDate.getDate():"0"+newDate.getDate()
        let fullDate = `${year}-${month}-${day}`
        weekArr.push(fullDate)
    }
    return weekArr
}